//
//  MqForumFontSizeCell.m
//  Meiqi
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 KFC. All rights reserved.
//

#import "MqForumFontSizeCell.h"

@implementation MqForumFontSizeCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, kScreenWidth / 4 + 10, 40)];
        _titleLabel.text = @"字体大小";
        [self.contentView addSubview:_titleLabel];
        
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(kScreenWidth / 3  + 10 - 0.4 , 5, kScreenWidth / 3 * 2- 20 + 0.5, 30)];
        view.backgroundColor = [UIColor redColor];
        view.layer.cornerRadius = 15;
        view.layer.masksToBounds = YES;
        [self.contentView addSubview:view];
        
        _seg = [[UISegmentedControl alloc] initWithItems:@[@"小", @"中", @"大", @"超大"]];
        
        _seg.frame = CGRectMake( 10 + kScreenWidth / 3 , 5, kScreenWidth / 3 * 2 - 20, 30);
        
        //  设置默认选中下标
        _seg.selectedSegmentIndex = 0;

        _seg.layer.cornerRadius = 15;
       
        _seg.backgroundColor = [UIColor whiteColor];
        
        _seg.tintColor = [UIColor redColor];
        _seg.layer.masksToBounds = YES;
        //    seg.segmentedControlStyle = UISegmentedControlStyleBordered;
        [self.contentView addSubview:_seg];
        
    }
    
    return self;
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
